package demo11;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;

@SuppressWarnings({"all"})
public class Test {
    public static void main(String[] args) {
        try(OutputStream outputStream=new FileOutputStream("d:/test.txt")){
            //这个下面的类就是把我们的这个字节流转换为字符流
            PrintWriter writer=new PrintWriter(outputStream);
            writer.printf("hello");
            writer.flush();
        }catch(IOException e){
            e.printStackTrace();
        }
    }
}
